<%@ tag language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ attribute name="imovel" required="true" type="br.com.seuimovelnamao.model.Imovel" %>
<div class="anuncio">
	<a href="/${imovel.categoria}/${imovel.intencao}/${fn:toLowerCase(imovel.endereco.estado.uf)}/${imovel.endereco.cidade.nomeURL}/${imovel.endereco.bairro.nomeURL}/${imovel.id}/"><img style="float: left; margin: 0 10px 0 0;" width="150" src="http://wp.contempographicdesign.com/wp_real_estate_3/wp-content/themes/realestate_3/img_resize/timthumb.php?src=http://wp.contempographicdesign.com/wp_real_estate_3/wp-content/uploads/2012/02/800-Mark-2401-3.jpg&amp;w=523&amp;zc=1" /></a>
	<div style="float:left; padding: 0 5px; width:400px;">
		<p>${imovel.titulo}</p>
		<p>${imovel.endereco.nomeCompleto}, ${imovel.endereco.bairro.nome}, ${imovel.endereco.cidade.nome} - ${imovel.endereco.estado.uf}</p>
		<p>${imovel.categoria} ${imovel.intencao}</p>
		<p><b>R$ ${imovel.preco}</b></p>
		<p>Dorms: ${imovel.dormitorios} Banh ${imovel.banheiros} Vagas ${imovel.vagasGaragem}</p>
		<p>Área: ${imovel.areaUtil}</p>
	</div>
	<div style="float:left; padding: 0 5px;">
		<c:choose>
			<c:when test="${not empty imovel.usuario.nome}">
				(${imovel.usuario.nome})
			</c:when>
			<c:otherwise>
				(${imovel.usuario.nomeFantasia})
			</c:otherwise>
		</c:choose>
	</div>
	<div style="clear:both;"></div>
</div>